package jinyilw.swing.visuals.Icomp;

import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JRadioButton;

import jinyilw.swing.i18n.ICSetting;
import jinyilw.swing.i18n.LanguageChanger;

public class IRadioButton extends JRadioButton implements LanguageChanger
{
	private static final long serialVersionUID = 1358755422197366631L;
	private ICSetting i18nSetting;

	public IRadioButton()
	{
	}

	public IRadioButton(Icon icon)
	{
		super(icon);
	}

	public IRadioButton(Action a)
	{
		super(a);
	}

	public IRadioButton(String text)
	{
		super(text);
	}

	public IRadioButton(Icon icon, boolean selected)
	{
		super(icon, selected);
	}

	public IRadioButton(String text, boolean selected)
	{
		super(text, selected);
	}

	public IRadioButton(String text, Icon icon)
	{
		super(text, icon);
	}

	public IRadioButton(String text, Icon icon, boolean selected)
	{
		super(text, icon, selected);
	}

	public IRadioButton(ICSetting iSetting)
	{
		setText(iSetting);
	}

	public IRadioButton(ICSetting iSetting, boolean selected)
	{
		setText(iSetting);
		setSelected(selected);
	}

	public IRadioButton(ICSetting iSetting, Icon icon)
	{
		setText(iSetting);
		setIcon(icon);
	}

	public void setICSetting(ICSetting iSetting)
	{
		i18nSetting = iSetting;
	}

	@Override
	public ICSetting getICSetting()
	{
		return i18nSetting;
	}

	@Override
	public void updateText(String text)
	{
		setText(text);
	}
}
